package edu.nf.takeoutdemo.mapper;

import edu.nf.takeoutdemo.commons.base.BaseMapper;
import edu.nf.takeoutdemo.model.entity.DishFlavor;

import java.util.List;

/**
 *
 * @author zjl
 * @date 2025/10/26
 */
public interface DishFlavorMapper extends BaseMapper<DishFlavor> {
    /**
     * 根据菜品id删除对应的口味数据
     * @param dishId
     */
    void deleteByDishId(Long dishId);

    /**
     * 根据菜品id集合删除对应的口味数据
     * @param dishIds
     */
    void deleteByDishIds(List<Long> dishIds);

    /**
     * 批量插入口味数据
     * @param flavors
     */
    void addBatch(List<DishFlavor> flavors);

    /**
     * 根据菜品id查询对应的口味数据
     * @param dishId
     * @return
     */
    List<DishFlavor> getByDishId(Long dishId);
}
